<script>
  function downloadDocs(){
    $.ajax({
      url: '?dDocs',
      type: 'POST',
      success: function() {
        window.location = '?dDocs';
      }
    });
  }
</script>
<?php
/**
 * Created by PhpStorm.
 * User: Aliaksander Lazerka
 * Date: 10/21/14
 * Time: 10:16 AM
 */
$a = array_keys($_GET)[0];
?>
<div class="mainMenuDiv">

  <div class="directoryDiv" id="directoryDiv">
  </div>

  <div class="menuDiv">
    <div class="menuItem" id="mainMainMenuItem" onclick="location.href='?main'">
      Главная
    </div>
    <div class="menuItem" id="catMainMenuItem" onclick="location.href='?cat'">
      Действия с каталогом
    </div>
    <div class="menuItem" id="usrMainMenuItem" onclick="location.href='?usr'">
      Действия с пользователями
    </div>
    <div class="menuItem" id="helpMainMenuItem" onclick="downloadDocs()">
      Помощь
    </div>
    <div class="menuItem" id="helpMainMenuItem" onclick="location.href='?sOH'">
      Выйти
    </div>
  </div>
</div>
<script>
  $('#<?= $a?>MainMenuItem').css('background-color', 'rgba(0,0,0,0.2)');
</script>